<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>props属性</title>
</head>
   
 <!-- props 传递 -->

<body>
    <div id="app">
        <ul>
          <todo-item v-for="item in b" v-bind:todo="item"></todo-item>
        </ul>
    </div>
</body>
<!-- 开发环境版本，包含了有帮助的命令行警告 -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
 Vue.component('todo-item',{
     props:['todo'],
     template: '<li>{{todo.text}}</li>'
 })
 var app = new Vue({
     el:'#app',
     data: {
         b: [
             {text:'aaaaa'},{text:'bbbbbb'},{text:'ccccc'}
         ],
     }
 })

</script>
</html>